<template>
	<view class="login-other">
		<view class="other-text">
			<view>或者用以下方式登录</view>
		</view>
		<view class="other">
			<view class="other-item" @tap='loginOther("weixin")'>
				<image src="../../static/img/wx.PNG" mode=""></image>
				<view>微信登录</view>
			</view>
			<view class="other-item" @tap='loginOther("sinaweibo")'>
				<image src="../../static/img/wbo.PNG" mode=""></image>
				<view>微博登录</view>
			</view>
			<view class="other-item" @tap='loginOther("qq")'>
				<image src="../../static/img/qq.PNG" mode=""></image>
				<view>QQ登录</view>
			</view>
		</view>	
	</view>
</template>

<script>
	import $http from '../../common/api/request.js'
	export default {
		methods:{
			loginOther(mode){
				uni.login({
					provider:mode,
					success: (res) => {
						console.log(res);
					}
				})
			}
		}
	}
</script>

<style scoped>
	/* 其他登录方式样式 */
	.login-other {
		padding: 100rpx 0;
	}
	.other-text {
		display: flex;
		padding: 50rpx 0;
	}
	.other-text view {
		line-height: 0;
		padding: 0 10rpx;
	}
	.other-text::after{
		content: '';
		flex: 1;
		height: 2rpx;
		background-color: #CCCCCC;
	}
	.other-text::before{
		content: '';
		flex: 1;
		height: 2rpx;
		background-color: #CCCCCC;
	}
	.other {
		display: flex;
		justify-content: space-around;
	}
	
	.other-item {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
	}
	.other-item image {
		width: 80rpx;
		height: 80rpx;
	}
</style>
